package com.ssmr.demo.service;

import com.ssmr.demo.dao.TUserMapper;
import com.ssmr.demo.entity.TRecordUserManyToOne;
import com.ssmr.demo.entity.TUser;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TUserServiceImpl implements TUserService {

    @Resource
    private TUserMapper tUserMapper;

    @Override
    public TRecordUserManyToOne selectRecordUser(Integer userId) {
        return tUserMapper.selectRecordUser(userId);
    }

    @Override
    public int deleteByPrimaryKey(Integer idtUser) {
        return tUserMapper.deleteByPrimaryKey(idtUser);
    }

    @Override
    public int insert(TUser record) {
        return tUserMapper.insert(record);
    }

    @Override
    public TUser selectByPrimaryKey(Integer idtUser) {
        return tUserMapper.selectByPrimaryKey(idtUser);
    }

    @Override
    public List<TUser> selectAll() {
        return tUserMapper.selectAll();
    }

    @Override
    public int updateByPrimaryKey(TUser record) {
        return tUserMapper.updateByPrimaryKey(record);
    }
}
